<template>
  <div class="login_parent" v-loading="loading">
    <div class="login_wrapper">
      <span class="logo_txt">系统登录</span>

      <el-row class="usernamediv" type="flex" justify="center">
        <el-col :span="6">
          <div>
            <el-input placeholder="请输入用户名" prefix-icon="el-icon-search" v-model="input2"></el-input>
          </div>
        </el-col>
      </el-row>

      <el-row class="passworddiv" type="flex" justify="center">
        <el-col :span="6">
          <div>
            <el-input
              placeholder="请输入密码"
              prefix-icon="el-icon-search"
              v-model="input2"
              show-password
            ></el-input>
          </div>
        </el-col>
      </el-row>

      <el-row class="loginbtdiv" type="flex" justify="center">
        <el-col :span="6">
          <div>
            <el-button class="lginbt" type="primary" @click="onLoginBtClick">登录</el-button>
          </div>
        </el-col>
      </el-row>
    </div>
  </div>
</template>

<script>
export default {
  name: "Login",
  data() {
    return {
      loading: false
    };
  },
  methods: {
    onLoginBtClick() {
      let that = this;
      this.loading = true;
      setTimeout(function() {
        that.loading = false;
        that.$router.push("/container");
      }, 3000);
    }
  }
};
</script>

<style type=sass>
.logo_txt {
  font-family: "微软雅黑";
  font-size: 18px;

}
.login_parent {
  background-image: url("../../static/pic/bg_login.png");
  background-position: center 110px;
  background-repeat: no-repeat;
  background-size: 100%;
  background-color: #f0f2f5;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  text-align: center;
  align-items: center;
}
.login_wrapper {
  width: 100%;
}
.usernamediv {
  margin-top: 15px;
}
.passworddiv {
  margin-top: 15px;
}
.loginbtdiv {
  margin-top: 15px;
}
.lginbt {
  width: 100%;
}
</style>